package org.ehe.business.supplier.controller;

import lombok.RequiredArgsConstructor;
import org.ehe.business.supplier.domain.vo.SupplierCategoryVO;
import org.ehe.business.supplier.service.SupplierCategoryService;
import org.ehe.common.core.domain.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * 供应商分类
 * @author :zhangnn
 * @className :SupplierCategoryController
 * @description: TODO
 * @date 2025-07-28 14:29:55
 */

@RestController
@RequiredArgsConstructor
@RequestMapping("/supplier/category")
public class SupplierCategoryController {

    private final SupplierCategoryService categoryService;

    /**
     * 供应商列表
     */
    @GetMapping("/list")
    public R<List<SupplierCategoryVO>> getSupplierCategories() {
        List<Long> categoryIds = new ArrayList<>();
        return R.ok(categoryService.getCategoriesByIds(categoryIds));
    }
}
